﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace MS.INV.MainData
{
    public partial class Customers : Lib.Bases.Forms.FBaseSearch
    {
        public Customers()
        {
            InitializeComponent();

            this._BaseClass = new SysObj.L_KhachHang();

            grid.GetGridView().OptionsBehavior.AutoExpandAllGroups = true;
        }

        private void Customers_Load(object sender, EventArgs e)
        {
            Reload();
        }

        public override void ShowDetail(DataRow Row)
        {
            int ID = (!object.Equals(Row, null)) ? Lib.Utils.Cvert.ToInt32(Row["IdKhachHang"], 0) : 0;
            Customer_New ff = new Customer_New(ID);
            ff.StartPosition = FormStartPosition.CenterScreen;
            ff.ShowDialog();
            if (ff.SaveChanged)
            {
                Reload();
            }
        }
    }
}
